var e = require;
var t = module;
var o = exports;
var n,
    i = o,
    a =
        ((n = function (e, t) {
            return (n =
                Object.setPrototypeOf ||
                ({__proto__: []} instanceof Array &&
                    function (e, t) {
                        e.__proto__ = t;
                    }) ||
                function (e, t) {
                    for (var o in t) t.hasOwnProperty(o) && (e[o] = t[o]);
                })(e, t);
        }),
        function (e, t) {
            function o() {
                this.constructor = e;
            }
            n(e, t), (e.prototype = null === t ? Object.create(t) : ((o.prototype = t.prototype), new o()));
        }),
    r = function (e, t, o, n) {
        var i,
            a = arguments.length,
            r = a < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, o)) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, o, n);
        else
            for (var s = e.length - 1; s >= 0; s--)
                (i = e[s]) && (r = (a < 3 ? i(r) : a > 3 ? i(t, o, r) : i(t, o)) || r);
        return a > 3 && r && Object.defineProperty(t, o, r), r;
    };
Object.defineProperty(i, "__esModule", {value: !0});
var s = e("AssetsMap"),
    c = e("BundleNames"),
    l = cc._decorator,
    d = l.ccclass,
    u =
        (l.property,
        (function (e) {
            function t() {
                var t = (null !== e && e.apply(this, arguments)) || this;
                return (t.isPlay = !1), (t.toastMap = {}), t;
            }
            return (
                a(t, e),
                (t.prototype.playAni = function (e) {
                    this.playDragonBones(e);
                }),
                (t.prototype.playDragonBones = function (e) {
                    this.node.active = !0;
                    var t = 0;
                    "一血" == e.killType
                        ? (t = 0)
                        : "单杀" == e.killType
                        ? (t = 0)
                        : "双杀" == e.killType
                        ? (t = 2)
                        : "三杀" == e.killType
                        ? (t = 3)
                        : "四杀" == e.killType
                        ? (t = 4)
                        : "五杀" == e.killType
                        ? (t = 5)
                        : "六杀" == e.killType
                        ? (t = 6)
                        : "七杀" == e.killType
                        ? (t = 7)
                        : "八杀" == e.killType && (t = 8),
                        null == this.toastMap[t] &&
                            ((this.toastMap[t] = game.UIManager.instance.createNodeByPreloading(
                                c.default.Game,
                                s.default.GameBundle.prefabs.assetsList["kill" + t]
                            )),
                            (this.toastMap[t].parent = this.node)),
                        null == this.toastMap[1] &&
                            ((this.toastMap[1] = game.UIManager.instance.createNodeByPreloading(
                                c.default.Game,
                                s.default.GameBundle.prefabs.assetsList.kill1
                            )),
                            (this.toastMap[1].parent = this.node),
                            this.toastMap[1]
                                .getComponent(dragonBones.ArmatureDisplay)
                                .playAnimation("newAnimation", 1)),
                        (this.toastMap[1].active = !0),
                        this.toastMap[1]
                            .getComponent(dragonBones.ArmatureDisplay)
                            .removeEventListener(dragonBones.EventObject.COMPLETE, this.showCallFunc, this),
                        this.toastMap[1]
                            .getComponent(dragonBones.ArmatureDisplay)
                            .addEventListener(dragonBones.EventObject.COMPLETE, this.showCallFunc, this),
                        this.toastMap[1].getComponent(dragonBones.ArmatureDisplay).playAnimation("newAnimation", 1),
                        (this.toastMap[1].getChildByName("label1").getComponent(cc.Label).string = e.other_snakeName),
                        (this.toastMap[1].getChildByName("label2").getComponent(cc.Label).string = e.self_snakeName),
                        0 == t || 1 == t || 6 == t || 7 == t || 8 == t
                            ? this.toastMap[t]
                                  .getComponent(dragonBones.ArmatureDisplay)
                                  .playAnimation("newAnimation", 1)
                            : this.toastMap[t].getComponent(dragonBones.ArmatureDisplay).playAnimation("jisha", 1);
                }),
                (t.prototype.showCallFunc = function () {
                    this.toastMap[1].active = !1;
                }),
                r([d], t)
            );
        })(cc.Component));
i.default = u;
